import { User } from '../../../core/auth/user.service';
import { ConfigService } from '../../../core/common/config.service';
import { BaseService } from '../../../core/service/base.service';
import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs';
@Injectable()
export class ProductService extends BaseService {
  constructor(protected http: Http, protected config: ConfigService) {
    super(http, config);
  }
  public getProducts(): Observable<any> {
    let url: any = {};
    url.service = 'ProductService';
    url.method = 'getProdList';
    return super.query(url, null, null, null);
  }
  public getDiscntByProd(prodId: string): Observable<any> {
    let url = 'service=DiscntService&method=getDiscntListByProd';
    return super.query(url, { prodId: prodId }, null, null);
  }
}
